import { request } from '@/utils'

export default {
  addProject: (name, desc, flow) => request.get(`/project/add?name=${name}&description=${desc}&flow=${flow}`), // 添加项目
  getProject: projectId => request.get(`/project/one?project_id=${projectId}`), // 单个项目信息
  addColumn: (projectId, name) => request.get(`/project/column/add?project_id=${projectId}&name=${name}`), // 新增列表
  getColumnList: projectId => request.get(`/project/column/lists?project_id=${projectId}`), // 项目列表
  getTaskList: projectId => request.get(`/project/task/lists?project_id=${projectId}`), // 任务列表
  // addTask: (projectId, name, content, owner, assist, column_id, times, p_level, p_name, p_color) => request.get(`/project/task/add?project_id=${projectId}&name=${name}&content=${content}&owner=${owner}&assist=${assist}&column_id=${column_id}&times=${times}&p_level=${p_level}&p_color=${p_color}&p_name=${p_name}`), // 新增卡片
  getBasic: userids => request.get(`/user/basic?userids=${userids}`), // 查询用户基本信息
  getFlowList: projectId => request.get(`/project/flow/list?project_id=${projectId}`), // 工作流列表
  deleteColumn: (projectId, columnId) => request.get(`/project/column/remove?column_id=${columnId}&project_id=${projectId}`), // 删除列表
  getOrgUser: () => request.get(`/user/list`), // 用户列表
  updateProjectUser: (projectId, userId) => request.get(`/project/user?project_id=${projectId}&userid=${userId}`), // 更新项目成员

}
